"""
@author: zjc
@file: zuoye.py
@time: 2022/11/4 17:38
"""
# import random
# s_person={"A":"a","B":"b","C":'c',"D":'d'}
# g_person={"A":"","B":"","C":'',"D":''}
# while  ""  in  g_person.values():
#     for key,value in s_person.items():
#         r_person=random.choice(list(g_person))
#         if key != r_person :
#            g_person[r_person]=value
#         if list(g_person.values()).count(value)>1:
#             g_person[r_person]=''
# print(g_person)


# 随机点名系统
# person=["A","B","C","D",'E']
# l_person=input("请输入要请假的学生:").split(" ")
# if l_person == ['']:
#     print("今天没有人请假")
# while True:
#     r_person = random.choice(person)
#     if r_person in l_person:
#         print(f"{r_person}同学今天请假,请重新抽取")
#     else:
#         print(f"请{r_person}同学回答问题")
#         break
# l_person.clear()

# 三乐购物系统
# import json
# print("------欢迎来到三乐购物系统!------")
# message = {}
# def regist():
#     with open("客人信息.txt",'a+') as fw:
#         root = input("请输入用户名:")
#         passwd = input("请输入密码:")
#         money = input("请输入金额:")
#         message[root]={"passwd":passwd,"money":money}
#         js = json.dumps(message)
#         fw.write(js)
#         fw.write('\n')
#
# def login():
#     fr=open("客人信息.txt",'r')
#     root = input("请输入用户名:")
#     passwd = input("请输入密码:")
#     lines = fr.readlines()
#     message_l={}
#     for line in lines:
#         message_c=eval(line)
#         message_l=dict(message_l,**message_c)
#
#     if root in message_l and passwd == message_l[root]['passwd']:
#         print("登陆成功")
#     elif root in message_l and passwd != message_l[root]["passwd"]:
#         print("密码错误,请重新输入密码")
#     else:
#         print("没有该用户，请注册")
#
# def shopping():
#     goods={"原神胡桃手机":4200,"平板电脑":6000,"崩坏三八重樱手办":998,"fgo自抽号":30,
#            "一箱橘子":58,"阿拉哈托人偶":600}
#     for key,value in goods.items():
#         print(key,"-->",value)
#
# while True:
#     num = input("请输入您要进行的操作:")
#     if num == '1':
#         login()
#         num1 = input("请输入您要进行的操作:")
#         if num1 == '1':
#             shopping()
#         else:
#             break
#     elif num == '2':
#         regist()
#     elif num == 'q':
#         break
#     else:
#         print('您输入的操作有误,请重新输入你要进行的操作')











